<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员登陆</title>
</head>
<body>
<%
	String str1=request.getParameter("name1");
	String str2=request.getParameter("password1");
	
	//判断用户名与密码是否正确
	if(str1.equals("admin")&str2.equals("admin")){
		 try {
		     request.getRequestDispatcher("managermaininfo.jsp").forward(request,response);
		    } 
		    catch (Throwable t) {
		     getServletContext().log(t.getMessage());
		    }
	}
	else{
		out.print("<script>alert('错误，请返回重新输入！');</script>");
		out.print("<script>window.location='managerlogin.jsp';</script>");
	}
%>
</body>
</html>